package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.YgExchangeOrderDetail;
import com.ygqh.baby.po.YgReturnOrderDetail;
import com.ygqh.baby.po.YgReturnOrderDetailExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface YgReturnOrderDetailMapper {
	int countByExample(YgReturnOrderDetailExample example);

	int deleteByExample(YgReturnOrderDetailExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgReturnOrderDetail record);

	int insertSelective(YgReturnOrderDetail record);

	List<YgReturnOrderDetail> selectByExample(YgReturnOrderDetailExample example);

	YgReturnOrderDetail selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgReturnOrderDetail record,
			@Param("example") YgReturnOrderDetailExample example);

	int updateByExample(@Param("record") YgReturnOrderDetail record,
			@Param("example") YgReturnOrderDetailExample example);

	int updateByPrimaryKeySelective(YgReturnOrderDetail record);

	int updateByPrimaryKey(YgReturnOrderDetail record);

	int countSuper(@Param("q") String q);

	List<YgReturnOrderDetail> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q);

	int saveExchangeOrderDetailBatch(@Param("exchangeDetail") List<YgExchangeOrderDetail> exchangeDetail);

	int updateSendBatch(@Param("detailList") List<YgReturnOrderDetail> detailList);

	List<Map<String, Object>> selectReturnInStockDetail(@Param("returnType") String returnType,
			@Param("startDate") Date startDate, @Param("endDate") Date endDate,
			@Param("questionDesc") String[] questionDesc);

	int updateDetailStatusBatch(@Param("detailList") List<YgReturnOrderDetail> detailList);

	int insertBatch(@Param("list") List<YgReturnOrderDetail> insertList);

	List<YgReturnOrderDetail> selectByReturnCodeList(@Param("list") List<String> returnCodeList);

	int updatePriceBatch(@Param("detailList") List<YgReturnOrderDetail> detailList);
}
